package submarinebattle;

import javax.swing.*;

/** 水雷潜艇 */
public class MineSubmarine extends SeaObject implements EnemyLife {
    public MineSubmarine(){
        super(63,19);
    }

    public void move(){
        setX(getX()+getSpeed());
    }

    public ImageIcon getImage(){
        return Images.minesubm;
    }

    public Mine shootMine(){

        return new Mine(this.getX()+this.getWidth(),this.getY()-11);
    }

    /** 重写getLife()获取命数 */
    public int getLife(){
        return 1;
    }
}
